package IO;

import java.io.File;
import java.io.IOException;

public class IODemo2 {
    public static void main(String[] args) throws IOException {
        File file = new File("./hello.txt");
        System.out.println(file.exists());
        System.out.println(file.isDirectory());
        System.out.println(file.isFile());
        file.createNewFile();
        System.out.println(file.exists());
        System.out.println(file.isDirectory());
        System.out.println(file.isFile());

        //没有修饰的
        System.out.println(file.getAbsolutePath());
        //打印绝对目录,修饰过的
        System.out.println(file.getCanonicalPath());

    }
}
